package ua.races.dom.analyzerDirector;


import org.w3c.dom.Element;
import ua.races.dom.analyzerDirector.decoratedAnalyzer.DecoratedRaceDocumentAnalyzer;

import java.util.List;

public class AnalyzeDirector {

    private DecoratedRaceDocumentAnalyzer documentAnalyzer;
    private Element root;

    public void setRoot(Element root) {
        this.root = root;
    }

    public void setDocumentAnalyzer(DecoratedRaceDocumentAnalyzer documentAnalyzer) {
        this.documentAnalyzer = documentAnalyzer;
    }

    public List getEntities() {
    return documentAnalyzer.getEntities();
  }

  public void constructDocument() {

     documentAnalyzer.createNewEntities();
     documentAnalyzer.buildList(root);

  }
}
